﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Article_priview.aspx.cs" Inherits="newBlog.admin.article.Article_priview" %>

<%@ Register Src="~/model/allLink.ascx" TagPrefix="uc1" TagName="allLink" %>
<%@ Import Namespace="newBlog.CenterInc.model" %>
<%@ Import Namespace="newBlog.CenterInc.Ctrltor" %>
<%
    
    if (Session["user_id"]==null) {
        Response.Write("{\"error\":\"您未登录本站\"}");
        return;
    }
    if (Convert.ToInt32(Session["user_grade"])!=1) { 
    Response.Write("{\"error\":\"您不是管理员\"}");
        return;
    }
    catalog_inc catalog_Inc = new catalog_inc();
    List<catalog_Dao> list = catalog_Inc.Wrting();
    int Count = list.Count();
    int i = 0;


%>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>文章预览-<%=Application["title"] %></title>
    <meta name="description" content="<%=Application["content"] %>">
    <meta name="keywords" content="<%=Application["key"] %>">
    <uc1:allLink runat="server" ID="allLink" />
    <script src="/js/admin/Article_preview.js?<%=DateTime.Now.ToString("yyyyMMddHHmmssffff") %>"></script>
    <script>
        RenderForm('select');
    </script>
</head>
<body>
    <div class="layui-row">
        <div class="layui-col-md">
            <div class="layui-panel margin0 layui-clear">
                <div class="layui-row layui-col-space5 margin0">
                    <div class="layui-col-md2" style="z-index: 1">
                        <div class="layui-input-inline left" style="width: 49%">
                            <input type="text" id="price_min" placeholder="￥" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-form-mid margin0" style="width: 2%">-</div>
                        <div class="layui-input-inline left" style="width: 49%;">
                            <input type="text" id="price_max" placeholder="￥" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-col-md2 " style="z-index: 1">
                        <div class="layui-input-inline left" style="width: 100%">
                            <div class="layui-input-inline left" style="width: 49%">
                                <input type="text" class="layui-input" id="date_min" placeholder="时间间隔">
                            </div>
                            <div class="layui-form-mid margin0" style="width: 2%">-</div>
                            <div class="layui-input-inline left" style="width: 49%;">
                                <input type="text" class="layui-input" id="date_max" placeholder="时间间隔">
                            </div>
                        </div>
                    </div>
                    <script>
                        RenderDate('#date_min', 'date', false, 'yyyy-MM-ddTHH:mm:ss', '2015-01-01', 0, 'click');
                        RenderDate('#date_max', 'date', false, 'yyyy-MM-ddTHH:mm:ss', '2015-01-01', 0, 'click');
                    </script>
                    <div class="layui-col-md1 layui-form">
                        <select id="ArticleCatalog" lay-verify="" lay-search>
                            <option value="">目录</option>
                            <%
                                for (; i < Count; i++)
                                {
                            %>
                            <option value="<%=list[i].Id %>"><%=list[i].Name %></option>
                            <%
                                }
                            %>
                        </select>

                    </div>
                    <div class="layui-col-md1">
                        <input type="text" class="layui-input" id="Article_Username" placeholder="用户名">
                    </div>
                    <div class="layui-col-md1">
                        <button type="button" class="layui-btn layui-btn-primary layui-border-blue layui-btn-fluid">筛选</button>
                    </div>
                    <div class="layui-col-md3 ">
                        <input type="text" id="order_id" required lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                    </div>
                    <div class="layui-col-md1">
                        <button type="button" class="layui-btn layui-btn-primary layui-border-blue layui-btn-fluid" onclick="table_screening()">
                            <i class="layui-icon layui-icon-search"></i>
                        </button>
                    </div>
                     <div class="layui-col-md1">
        <button type="button" class="layui-btn layui-btn-primary layui-btn-fluid" onclick="window.location.reload()">
        <i class="layui-icon layui-icon-refresh"></i>
        </button>
        </div>
                </div>
            </div>
        </div>
    </div>
    <!--顶部操作面板-->
    <div class="layui-row RowSpace layui-col-space10 margin0">
        <div class="layui-col-md1 layui-col-xs3 ">
            <button type="button" class="layui-btn layui-btn-fluid" onclick="getSelectedRowMsgDel()">删除选中</button>
        </div>
        <div class="layui-col-md1 layui-col-xs3">
            <button type="button" class="layui-btn layui-btn-fluid" onclick="getSelectedRowMsgMove()">移动至</button>
        </div>
        <div class="layui-col-md2 layui-col-xs3 layui-form">
            <select id="MoveCatalog" lay-verify="" lay-search>
                <option value="">目录</option>
                <%
                    i = 0;
                    for (; i < Count; i++)
                    {
                %>
                <option value="<%=list[i].Id %>"><%=list[i].Name %></option>
                <%
                    }
                %>
            </select>
        </div>

    </div>
    <!--表格头部按钮-->
    <div class="layui-row RowSpace">
        <div class="layui-panel margin0">
            <table id="ArticleList" lay-filter="ArticleList"></table>
            <!--文章列表-->
            <script>
                RenderTable("#ArticleList", '', '/CenterInc/view_json/admin/Article_priview_json.aspx', true, [[
                    { field: 'caozuo', title: '操作', fixed: 'left', type: 'checkbox' }
                    , { field: 'Id', title: 'ID', sort: true }
                    , { field: 'User_id', title: '用户ID' }
                    , { field: 'Title', title: '标题', sort: true }
                    , { field: 'Img', title: '封面' }
                    , { field: 'Catalog', title: '分类' }
                    , { field: 'Describe', title: '描述' }
                    , { field: 'Price', title: '价格' }
                    , { field: 'Time', title: '时间', sort: true }

                    , { field: 'toolbar', title: '操作', align: 'center', toolbar: '#table_bar' }
                ]], 20, '', 'post');
                tabel_event();
            </script>
            <script type="text/html" id="table_bar">
                <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
                <a class="layui-btn layui-bg-red layui-btn-xs" lay-event="del">删除</a>
            </script>
        </div>
    </div>
    <!--中部内容-->
</body>
</html>
